var circle = require('./circle.js');
var fileUtil = require('./fileUtil.js');
var warUtil = require('./war.js');
var test = require("./test.js");

module.exports = function(config) {
	this.router = function(express) {
		var router = express.Router();
		router.route('/calculateCircleArea').get(circle.area);
		router.route('/upload').post(fileUtil.upload);
		router.route('/getProcessingWar').get(fileUtil.getProcessingWar);
		router.route('/zip').get(circle.zip);
		router.route('/buildingWar').get(warUtil.building_war);
		router.route('/register').post(test.register);
		console.log('路由注册成功！');
		var logger = require('./log.js').logger; 
        logger.info('路由注册成功！');  
		return router;
	};
};